package me.jessyan.mvparms.demo.di.module.car;

import com.jess.arms.di.scope.ActivityScope;

import dagger.Module;
import dagger.Provides;

import me.jessyan.mvparms.demo.mvp.contract.car.ChoiceCarContract;
import me.jessyan.mvparms.demo.mvp.model.car.ChoiceCarModel;


@Module
public class ChoiceCarModule {
    private ChoiceCarContract.View view;

    /**
     * 构建ChoiceCarModule时,将View的实现类传进来,这样就可以提供View的实现类给presenter
     *
     * @param view
     */
    public ChoiceCarModule(ChoiceCarContract.View view) {
        this.view = view;
    }

    @ActivityScope
    @Provides
    ChoiceCarContract.View provideChoiceCarView() {
        return this.view;
    }

    @ActivityScope
    @Provides
    ChoiceCarContract.Model provideChoiceCarModel(ChoiceCarModel model) {
        return model;
    }
}